package edu.infomatik.tundra.pages;

import org.apache.tapestry5.annotations.SessionState;

import edu.infomatik.tundra.data.DAOtundra;
import edu.infomatik.tundra.logic.security.SystemAccessBean;
import edu.infomatik.tundra.logic.WorkBean;

@SuppressWarnings("unused")
public class CreateWork {
	@SessionState
	private WorkBean work;
	@SessionState
	private SystemAccessBean user;
	private boolean userExists;
	@SessionState
	private Boolean newWork;
		

	String onActivate(){
		if (!userExists) return "Index";
		newWork=new Boolean(false);
		return null;
	}
	
	void onSubmitFromWork(){
		DAOtundra.getInstance().update(work);
	}
}